package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchMeasurementPointMapper;
import com.ruoyi.system.domain.DispatchMeasurementPoint;
import com.ruoyi.system.service.IDispatchMeasurementPointService;

/**
 * 测点信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchMeasurementPointServiceImpl implements IDispatchMeasurementPointService 
{
    @Autowired
    private DispatchMeasurementPointMapper dispatchMeasurementPointMapper;

    /**
     * 查询测点信息
     * 
     * @param measurementPointId 测点信息主键
     * @return 测点信息
     */
    @Override
    public DispatchMeasurementPoint selectDispatchMeasurementPointByMeasurementPointId(Long measurementPointId)
    {
        return dispatchMeasurementPointMapper.selectDispatchMeasurementPointByMeasurementPointId(measurementPointId);
    }

    /**
     * 查询测点信息列表
     * 
     * @param dispatchMeasurementPoint 测点信息
     * @return 测点信息
     */
    @Override
    public List<DispatchMeasurementPoint> selectDispatchMeasurementPointList(DispatchMeasurementPoint dispatchMeasurementPoint)
    {
        return dispatchMeasurementPointMapper.selectDispatchMeasurementPointList(dispatchMeasurementPoint);
    }

    /**
     * 新增测点信息
     * 
     * @param dispatchMeasurementPoint 测点信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchMeasurementPoint(DispatchMeasurementPoint dispatchMeasurementPoint)
    {
        return dispatchMeasurementPointMapper.insertDispatchMeasurementPoint(dispatchMeasurementPoint);
    }

    /**
     * 修改测点信息
     * 
     * @param dispatchMeasurementPoint 测点信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchMeasurementPoint(DispatchMeasurementPoint dispatchMeasurementPoint)
    {
        return dispatchMeasurementPointMapper.updateDispatchMeasurementPoint(dispatchMeasurementPoint);
    }

    /**
     * 批量删除测点信息
     * 
     * @param measurementPointIds 需要删除的测点信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMeasurementPointByMeasurementPointIds(Long[] measurementPointIds)
    {
        return dispatchMeasurementPointMapper.deleteDispatchMeasurementPointByMeasurementPointIds(measurementPointIds);
    }

    /**
     * 删除测点信息信息
     * 
     * @param measurementPointId 测点信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMeasurementPointByMeasurementPointId(Long measurementPointId)
    {
        return dispatchMeasurementPointMapper.deleteDispatchMeasurementPointByMeasurementPointId(measurementPointId);
    }
}
